﻿@model Apps.Models.WMS.WMS_AIModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.WMS;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
$(function () {
    $("#btnSave").click(function () {
        if ($("form").valid()) {
            $.ajax({
                url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(false);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
         window.parent.frameReturnByClose();
    });
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByMes(mes) {
$.messageBox5s(Lang.Tip, mes);
}
</script>
<div id="modalwindow" class="easyui-window" style="width:800px; height:400px;" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
<div class="mvctool bgb">
    @Html.ToolButton("btnSave", "fa fa-save", Resource.Save, ref perm, "Save", true)
    @Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply, false)
</div>
@using (Html.BeginForm())
{
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.POId)
    @Html.HiddenFor(model => model.PartId)
    @Html.HiddenFor(model => model.CreateTime)
    @Html.HiddenFor(model => model.CreatePerson)
    @Html.HiddenFor(model => model.ReceiveMan)
    @Html.HiddenFor(model => model.ReceiveStatus)
    @Html.HiddenFor(model => model.ReceiveStatus)
    @Html.HiddenFor(model => model.InspectStatus)
    @Html.HiddenFor(model => model.InStoreStatus)
    <table class="formtable">
        <tbody>
            <tr>
                <th>
                    @Html.LabelFor(model => model.ArrivalBillNum)：
                </th>
                <td>
                    @Html.ReadOnlyTextBoxFor(model => model.ArrivalBillNum, true)
                </td>
                <td>@Html.ValidationMessageFor(model => model.ArrivalBillNum)</td>
            </tr>
            <tr>
                <th>
                    采购订单号：
                </th>
                <td>
                    @Html.ReadOnlyTextBoxFor(model => model.PO, true)
                </td>
                <td>@Html.ValidationMessageFor(model => model.PO)</td>
            </tr>
            <tr>
                <th>
                    物料编码：
                </th>
                <td>
                    @Html.ReadOnlyTextBoxFor(model => model.PartCode, true)
                </td>
                <td>@Html.ValidationMessageFor(model => model.PartCode)</td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.ArrivalQty)：
                </th>
                <td>
                    @Html.EditorFor(model => model.ArrivalQty)
                </td>
                <td>@Html.ValidationMessageFor(model => model.ArrivalQty)</td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.BoxQty)：
                </th>
                <td>
                    @Html.EditorFor(model => model.BoxQty)
                </td>
                <td>@Html.ValidationMessageFor(model => model.BoxQty)</td>
            </tr>

            <tr>
                <th>
                    @Html.LabelFor(model => model.ArrivalDate)：
                </th>
                <td>
                    @Html.TextBoxFor(model => model.ArrivalDate, new { @onClick = "WdatePicker()", @style = "width: 120px" })
                </td>
                <td>@Html.ValidationMessageFor(model => model.ArrivalDate)</td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.Lot)：
                </th>
                <td>
                    @Html.EditorFor(model => model.Lot)
                </td>
                <td>@Html.ValidationMessageFor(model => model.Lot)</td>
            </tr>
        </tbody>
    </table>
}

